cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
#rosbuild_add_boost_directories()
#rosbuild_link_boost(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
#link_directories(/home/robot/ros_workspace/dd2425-robot-test-drivers-read-only/roboard_drivers/opencv242/opencv)
#link_directories(/home/robot/ros_workspace/dd2425-robot-test-drivers-read-only/roboard_drivers/opencv242/opencv2)
link_directories(/usr/lib)
link_directories(/usr/local/lib/)
include_directories(/usr/local/include/opencv2)
include_directories(/usr/local/include/opencv)
#list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
#find_package(eigen3 REQUIRED)
#include_directories(${Eigen3_INCLUDE_DIRS})
#Christoffer och Sarah
rosbuild_add_executable(listenIR src/listenIR.cpp)
rosbuild_add_executable(printIR src/printIR.cpp)

# CARL OCH MAGNUS
rosbuild_add_executable(MotorControl src/MotorControl.cpp)
rosbuild_add_executable(MotorKeybd src/MotorKeybd.cpp)
# rosbuild_add_executable(topicTest src/topicTest.cpp)

#FollowLine 
rosbuild_add_executable(WallFollower src/followRightWall.cpp)

#rosbuild_add_executable(Test src/test.cpp)

#rosbuild_add_executable(StateDeterminator src/StateDeterminator.cpp)

rosbuild_add_executable(StateSignalProcessor src/StateSignalProcessor.cpp)
rosbuild_add_executable(StateMachine src/StateMachine.cpp)

#CameraNode 
#rosbuild_add_executable(VideoStream src/VideoStream.cpp)
#target_link_libraries(VideoStream opencv_core opencv_highgui)
rosbuild_add_executable(TagDetecter src/DetectTag.cpp)
target_link_libraries(TagDetecter opencv_core opencv_highgui opencv_imgproc opencv_features2d opencv_flann opencv_objdetect opencv_ml opencv_photo opencv_stitching opencv_legacy)

#TagIdentification Node
#rosbuild_add_executable(TagIdentificator src/tag_identification.cpp)
#target_link_libraries(TagIdentificator opencv_core opencv_highgui opencv_imgproc)

#Mapping
rosbuild_add_executable(mapNode src/mapNode.cpp)

#TESTING
#rosbuild_add_executable(TestImgNode src/TestImgNode.cpp)
#target_link_libraries(TestImgNode opencv_core opencv_highgui opencv_imgproc opencv_features2d opencv_flann opencv_objdetect opencv_ml opencv_photo opencv_stitching opencv_legacy)

rosbuild_add_executable(PathFinder src/findingPath.cpp)

rosbuild_add_executable(PathFollower src/followingPath.cpp)

rosbuild_add_executable(Queen src/queen.cpp)
